package com.tear.service;

import com.tear.bean.User;
import com.tear.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User findById(int id) {
        return userMapper.findById(id);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public void delete(int id) {
userMapper.delete(id);
    }

    @Override
    public void update(User user) {
userMapper.update(user);
    }

    @Override
    public void add(User user) {
userMapper.add(user);
    }
}
